package com.ysstech.regression.service;

import com.ysstech.common.entity.PageBean;
import com.ysstech.common.util.resultutil.RestResult;
import com.ysstech.regression.entity.Usecase;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author lishuangliang
 * @since 2022-03-04
 */
public interface UsecaseService extends IService<Usecase> {

    /**
     * 查询列表数据
     *
     * @param usecase
     * @param pageBean
     * @return
     * @throws Exception
     */
    public PageBean<Usecase> queryAllUsecase(Usecase usecase, PageBean pageBean) throws Exception;

    /**
     * get 方式执行用例
     *
     * @param usecase
     * @return
     * @throws Exception
     */
    public String sendGet(Usecase usecase) throws Exception;


    /**
     * post 方式执行用例
     *
     * @param usecase
     * @return
     * @throws Exception
     */
    public String sendPost(Usecase usecase) throws Exception;

    /**
     * 导入标准数据
     *
     * @param usecase
     * @return
     * @throws Exception
     */
    public Integer upload(Usecase usecase) throws Exception;

    /**
     * 获取数据库表的 字段和对应的类型
     *
     * @param usecase
     * @return
     * @throws Exception
     */
    public Map<String, String> getTableColumnNames(Usecase usecase) throws Exception;
    /**
     * 通过sql查询数据
     *
     * @param usecase
     * @param pageBean
     * @return
     * @throws Exception
     */
    public RestResult queryData(Usecase usecase, PageBean pageBean) throws Exception;

}
